package com.framework.admin.mapper;

import com.framework.admin.model.SysMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

@Mapper
public interface MenuMapper {
    List<SysMenu> findMenu(Map<String, Object> params);

    Page<SysMenu> findMenus(@Param("menu") SysMenu menu, Pageable pageable);

    List<String> getChildrenIds(List<String> list);

    Integer getMaxCodeNum();

    int countPath(@Param("pcode")String pcode,@Param("path")String path);

    List<SysMenu> getChildren(@Param("pcode")String pcode);

    SysMenu findByCode(@Param("code")String code);

    int existsCode(SysMenu menu);

    List<SysMenu> findByRoleId(String roleId);

    List<String> findIdByCodes(List<String> codes);
}
